﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace PloobsEngine.Particle3D
{
    public class BombsEmiter : GeneralEmiter
    {
        public BombsEmiter(Vector3 pos)
        {
            particlesPos = pos;
        }

        TimeSpan timeToNextProjectile = TimeSpan.Zero;
        Vector3 particlesPos;
       
        void UpdateExplosions(GameTime gameTime)
        {
            timeToNextProjectile -= gameTime.ElapsedGameTime;

            if (timeToNextProjectile <= TimeSpan.Zero)
            {
                this.particleManager.AddEmiter(new ProjectileEmiter(particlesPos));
                timeToNextProjectile += TimeSpan.FromSeconds(1);
            }
        }

        public override void UpdateEmiter(Microsoft.Xna.Framework.GameTime gt)
        {
            UpdateExplosions(gt);
        }
        public override string[] ParticleSystemUsed()
        {
            return new string[] { };
        }

    }
}
